package com.sright.bcard.content.dal.dao.impl;

import com.sright.bcard.common.service.share.base.dao.BaseDAOImpl;
import com.sright.bcard.common.service.share.base.dao.BaseMapper;
import com.sright.bcard.content.dal.dao.CardBaseInfoDAO;
import com.sright.bcard.content.dal.entity.CardBaseInfoDO;
import com.sright.bcard.content.dal.mapper.CardBaseInfoDOMapper;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;

@Repository
public class CardBaseInfoDAOImpl extends BaseDAOImpl<CardBaseInfoDO> implements CardBaseInfoDAO {

    @Resource
    private CardBaseInfoDOMapper cardBaseInfoDOMapper;

    @Override
    protected BaseMapper<CardBaseInfoDO> getObjMapper() {
        return cardBaseInfoDOMapper;
    }

    @Override
    public Integer deleteById(Long baseInfoId) {
        return cardBaseInfoDOMapper.deleteById(baseInfoId);
    }

    @Override
    public CardBaseInfoDO selectByUserId(Long userId) {
        return cardBaseInfoDOMapper.selectByUserId(userId);
    }

    @Override
    public List<CardBaseInfoDO> selectByIds(List<Long> cardBaseInfoIds) {
        return cardBaseInfoDOMapper.selectByIds(cardBaseInfoIds);
    }
}
